package com.tzbank.wisdom.controller;

import com.tzbank.wisdom.service.AccountManageService;
import com.tzbank.wisdom.service.LimitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 注冊
 * wangdajun
 */
@Api(tags = {"账户管理"})
@RequestMapping("accountManage")
@RestController
public class AccountManageController {
    @Autowired
    private AccountManageService accountManageService;

    /**
     * 更改账户别名
     *
     * @param
     * @param reqBody
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/updateAcctAlias")
    @ApiOperation(value = "updateAcctAlias", notes = "更新账户别名")
    public Map<String, Object> updateAcctAlias(@RequestBody Map<String, String> reqBody) {
        return accountManageService.updateAcctAlias(reqBody);
    }
    
    /**
     * 可下挂列表
     *
     * @param
     * @param reqBody
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/queryHangingAccount")
    @ApiOperation(value = "queryHangingAccount", notes = "可下挂列表")
    public Map<String, Object> queryHangingAccount(@RequestBody Map<String, String> reqBody) {
        return accountManageService.queryHangingAccount(reqBody);
    }
    /**
     * 查询操作记录
     * @param paramMap
     * @return
     */
    @ResponseBody
	@PostMapping(value = "/operLog")
	@ApiOperation(value="查询操作记录",notes="查询用户操作记录")
	public Map<String,Object> operLog(@RequestBody Map<String,String> paramMap){
		return accountManageService.getOperLogs(paramMap);
	
	}
    @ResponseBody
    @PostMapping(value = "/queryDetail")
    @ApiOperation(value = "账户交易信息查询", notes = "账户交易信息查询")
	public Map<String,Object> queryAccountTransactionDetail(@RequestBody Map<String,Object> paramsMap){
		return accountManageService.queryAccountTransactionDetail(paramsMap);
	}
    /**
     * 添加下挂账户
     */
    @ResponseBody
    @PostMapping(value = "/addHangingAccount")
    @ApiOperation(value = "添加下挂账户", notes = "添加下挂账户")
	public Map<String,Object> addHangingAccount(@RequestBody Map<String,String> paramsMap){
		return accountManageService.addHangingAccount(paramsMap);
	}
    
    /**
     * 账户的挂失解挂
     * llz
     */
    @ResponseBody
    @PostMapping(value = "/hangAndSolutionAccount")
    @ApiOperation(value = "账户的挂失解挂", notes = "账户的挂失解挂")
	public Map<String,Object> hangAndSolutionAccount(@RequestBody Map<String,String> paramsMap){
		return accountManageService.hangAndSolutionAccount(paramsMap);
	}
    
    @PostMapping(value="accountDetail")
    @ApiOperation(value="卡账户明细查询",notes="卡明细查询")
    public Map<String,Object> queryAcctDetial(@RequestBody Map<String,Object> paramsMap){
    	
    	return accountManageService.queryAcctDetial(paramsMap);
    }
    
    
    
    /**
     * 查询收支与支出（）
     * @param paramsMap
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/queryExpendAndIn")
    @ApiOperation(value = "查询收支与收入", notes = "查询收支与收入")
	public Map<String,Object> queryExpendAndIn(@RequestBody Map<String,Object> paramsMap){
		return accountManageService.queryExpendAndIn(paramsMap);
	} 
    
}

